package Model.permission;

import utils.permission.IStatusMessage;

import java.io.Serializable;

/**
 * @类名称： ResponseResult
 * @类描述： 前端请求响应结果,code:编码,message:描述,obj对象，可以是单个数据对象，数据列表或者PageInfo
 */
public class ResponseResult implements Serializable {

	private static final long serialVersionUID = 7285065610386199394L;

	private String code;
	private String message;
	private Object obj;
	private int user_id;
	private String user_number;
	private String department_settlement_code;

	public ResponseResult() {
		this.code = IStatusMessage.SystemStatus.SUCCESS.getCode();
		this.message = IStatusMessage.SystemStatus.SUCCESS.getMessage();
	}

	public ResponseResult(IStatusMessage statusMessage){
		this.code = statusMessage.getCode();
		this.message = statusMessage.getMessage();

	}

	public static long getSerialVersionUID () {
		return serialVersionUID;
	}

	public String getCode () {
		return code;
	}

	public void setCode (String code) {
		this.code = code;
	}

	public String getMessage () {
		return message;
	}

	public void setMessage (String message) {
		this.message = message;
	}

	public Object getObj () {
		return obj;
	}

	public void setObj (Object obj) {
		this.obj = obj;
	}

	public int getUser_id () {
		return user_id;
	}

	public void setUser_id (int user_id) {
		this.user_id = user_id;
	}

	public String getUser_number() { return user_number; }

	public void setUser_number(String user_number) { this.user_number = user_number; }

	public String getDepartment_settlement_code() {
		return department_settlement_code;
	}

	public void setDepartment_settlement_code(String department_settlement_code) {
		this.department_settlement_code = department_settlement_code;
	}

	@Override
	public String toString () {
		return "ResponseResult{" +
				"code='" + code + '\'' +
				", message='" + message + '\'' +
				", obj=" + obj +
				", user_id=" + user_id +
				", user_number=" + user_number +
				", department_settlement_code=" + department_settlement_code +
				'}';
	}
}
